﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Company.Infrastructure;
using Company.Web.Infrastructure;


namespace Company.Web.Model
{
    //[ValidateDateRange("DateFrom","DateTo")]
    public class LoginsView:ILoginsView
    {
        [Required(ErrorMessage = ValidationErrors.Required)]
        [StringLength(20, ErrorMessage = ValidationErrors.StringLenghtMax)]
        [ValidateStringLength(6, ErrorMessage = ValidationErrors.StringLenghtMin)]
        [DisplayName("Nombre de Usuario")]
        public string UserName { get; set; }

        [Required(ErrorMessage = ValidationErrors.Required)]
        [StringLength(20, ErrorMessage = ValidationErrors.StringLenghtMax)]
        [ValidateStringLength(7, ErrorMessage = ValidationErrors.StringLenghtMin)]
        [DisplayName("Contraseña")]
        public string Password { get; set; }

        public string CompanyName { get; set; }

        [DisplayName("Fecha Inicio")]
        public DateTime DateFrom { get; set; }

        [DisplayName("Fecha Fin")]
        public DateTime DateTo { get; set; }
    }
}
